package club.beimeng.emailserver2.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 小艾同学
 * @since 2021-09-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="EmailTemplate对象", description="")
public class EmailTemplate implements Serializable {

    public EmailTemplate() {
    }

    public EmailTemplate(Long tid, String template, Integer argsNum, Date createTime) {
        this.tid = tid;
        this.template = template;
        this.argsNum = argsNum;
        this.createTime = createTime;
    }

    private static final long serialVersionUID = 1L;

    @JsonSerialize(using= ToStringSerializer.class)
    @TableId(value = "tid", type = IdType.ASSIGN_ID)
    private Long tid;

    @ApiModelProperty(value = "邮件发送模板")
    private String template;

    @ApiModelProperty(value = "这个模板中使用的参数数量")
    private Integer argsNum;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;


}
